package com.healthy.support.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.support.mapper.FeedbackCategoriesMapper;
import com.healthy.support.domain.FeedbackCategories;
import com.healthy.support.service.IFeedbackCategoriesService;

/**
 * 反馈分类Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class FeedbackCategoriesServiceImpl implements IFeedbackCategoriesService 
{
    @Autowired
    private FeedbackCategoriesMapper feedbackCategoriesMapper;

    /**
     * 查询反馈分类
     * 
     * @param categoryId 反馈分类主键
     * @return 反馈分类
     */
    @Override
    public FeedbackCategories selectFeedbackCategoriesByCategoryId(Long categoryId)
    {
        return feedbackCategoriesMapper.selectFeedbackCategoriesByCategoryId(categoryId);
    }

    /**
     * 查询反馈分类列表
     * 
     * @param feedbackCategories 反馈分类
     * @return 反馈分类
     */
    @Override
    public List<FeedbackCategories> selectFeedbackCategoriesList(FeedbackCategories feedbackCategories)
    {
        return feedbackCategoriesMapper.selectFeedbackCategoriesList(feedbackCategories);
    }

    /**
     * 新增反馈分类
     * 
     * @param feedbackCategories 反馈分类
     * @return 结果
     */
    @Override
    public int insertFeedbackCategories(FeedbackCategories feedbackCategories)
    {
        return feedbackCategoriesMapper.insertFeedbackCategories(feedbackCategories);
    }

    /**
     * 修改反馈分类
     * 
     * @param feedbackCategories 反馈分类
     * @return 结果
     */
    @Override
    public int updateFeedbackCategories(FeedbackCategories feedbackCategories)
    {
        return feedbackCategoriesMapper.updateFeedbackCategories(feedbackCategories);
    }

    /**
     * 批量删除反馈分类
     * 
     * @param categoryIds 需要删除的反馈分类主键
     * @return 结果
     */
    @Override
    public int deleteFeedbackCategoriesByCategoryIds(Long[] categoryIds)
    {
        return feedbackCategoriesMapper.deleteFeedbackCategoriesByCategoryIds(categoryIds);
    }

    /**
     * 删除反馈分类信息
     * 
     * @param categoryId 反馈分类主键
     * @return 结果
     */
    @Override
    public int deleteFeedbackCategoriesByCategoryId(Long categoryId)
    {
        return feedbackCategoriesMapper.deleteFeedbackCategoriesByCategoryId(categoryId);
    }
}
